﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


namespace HandMade_Q4T_.Pages
{
    public partial class Home : System.Web.UI.Page
    {
        C_SanPham sp = new C_SanPham();
        C_XLDL db = new C_XLDL();
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadData_repeater();
        }

        public void LoadData_repeater()
        {
            
            if (!IsPostBack)
            {
                sp.Load_Repeater(rpt_newProducts, "select top 9 *from ChatLieu cl,SanPham sp,NhaCungCap ncc,Loaisp l where cl.macl=sp.macl and sp.mancc=ncc.mancc and sp.maloai=l.maloai");
                rpt_newProducts.DataBind();
                sp.Load_Repeater(rpt_category, "SELECT * FROM LOAISP");
            }            
        }
        
    }
}